package com.zjitc.service.imp;

import com.zjitc.dao.CountryDao;
import com.zjitc.model.Country;
import com.zjitc.service.CountryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/3/20.
 */
@Service
public class CountryServiceImp implements CountryService{
    @Autowired
    private CountryDao countryDao;
    @Override
    public List<Country> findAll() {
        return countryDao.findAll();
    }

    @Override
    public int add(Country country) {
      return countryDao.add(country);
    }

    @Override
    public int delete(String name) {
      return countryDao.delete(name);
    }

    @Override
    public int update(Country country) {
      return countryDao.update(country);
    }


    @Override
    public List<Country> findAllCate() {
      return countryDao.findAllCate();
    }

    @Override
    public Country edit(String name) {
        return countryDao.edit(name);
    }

}
